package com.spring.springsentinelclient.controller;

import com.alibaba.csp.sentinel.annotation.SentinelResource;
import com.spring.springsentinelclient.service.TestService;
import org.aspectj.weaver.ast.Test;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.Map;

@RestController
public class TestController {

    @Resource
    TestService testService;
    @RequestMapping(value = "/getTest",produces = "application/json;charset=UTF-8")
    public Map<String,Object> getTest(){

        testService.test();
        Map<String,Object> result = new HashMap<>();
        result.put("code","success");
        return result;
    }
}
